From 594e7214e159df65a79e28906013c80e8bee0be2 Mon Sep 17 00:00:00 2001 From: "robertlipe@gmail.com" Date: Mon, 28 Jan 2013 01:13:04 +0000 Subject: [PATCH] Don't use QDateTime to parse XML times just yet. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4270 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gpx.cc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index 10b83a78e..735d8bf08 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -855,27 +855,6 @@ gs_get_container(geocache_container t) time_t xml_parse_time(const char* cdatastr, int* microsecs) { -#if NEWTIME - time_t rv = 0; - QString string_date(cdatastr); - - // Lovely. It looks like the OSM format triggers Qt Bug 18290. by - // leaving it ambiguous whether DST is in effect, which triggers local - // time. Allegedly fixed in Qt 5.0, but trivial to work around. - // https://bugreports.qt-project.org/browse/QTBUG-18290 - if (string_date.endsWith("+00:00")) { - string_date.replace("+00:00", "Z"); - } - QDateTime dt(QDateTime::fromString(string_date, Qt::ISODate)); - - if (dt.isValid()) { - rv = dt.toTime_t(); - if (microsecs) { - *microsecs = dt.time().msec() * 1000; - } - } - return rv; -#else int off_hr = 0; int off_min = 0; int off_sign = 1; @@ -939,7 +918,6 @@ xml_parse_time(const char* cdatastr, int* microsecs) xfree(timestr); return rv; -#endif } static void -- 2.30.2